//
//  ViewController.swift
//  BLE-Center
//
//  Created by WZ on 2018/2/3.
//  Copyright © 2018年 xcamera. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    @IBOutlet weak var topTextView: UITextView!
    @IBOutlet weak var inputTextField: UITextField!
    @IBOutlet weak var sendBtn: UIButton!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        _ = WZPeripheralManager.shared.checkAuthorizeStatus()
    }
    
    
    @IBAction func sendBtnAction(_ sender: Any) {
        guard let text = inputTextField.text else { return }
        if text.lengthOfBytes(using: .utf8) > 0 {
            let isSuccess = WZPeripheralManager.shared.sendMsg(text)
            print("消息发送结果:\(isSuccess)")
        }
    }
    
    
}


